﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using YYSite.Common;
using YYSite.Application.System.Roles;
using YYSite.Domain.System.Roles;
namespace YYSite.System.Controllers
{
    public class RoleController:Controller
    {
        public RoleController(IRoleService roleService)
        {
            RoleService = roleService;
        }

        protected IRoleService RoleService { get; }

       
        public IActionResult Index()
        {
            //this.RoleService.CreateRole( new Role() { Name="管理员" });
            //this.RoleService.CreateRole(new Role() { Name = "教职工" });
            //this.RoleService.CreateRole(new Role() { Name = "学生" });
            //this.RoleService.CreateRole(new Role() { Name = "家长" });
            return View();
        }

        public DataGridOutput<Role> GetRoleByPage(GetRoleDataGridInput input)
        {
             return this.RoleService.GetRoleByPage(input);
  
        }
    }
}
